Activity Timeline

The activity timeline displays each of the user’s upcoming, current, and past activities.

Baseprototype

Preview

Code

<ul class="timeline">
  <li class="slds-timeline__item">
    <span class="slds-assistive-text">Task</span>
    <div class="slds-media">
      <div class="slds-media__body">
        <div class="slds-media slds-media--timeline slds-timeline__media--task">
          <div class="slds-media__figure">
            <svg aria-hidden="true" class="slds-icon slds-icon-standard-task slds-timeline__icon">
              <use xlink:href="/assets/icons/standard-sprite/svg/symbols.svg#task"></use>
            </svg>
          </div>
          <div class="slds-media__body">
            <div class="slds-media slds-tile slds-media--small">
              <div class="slds-media__figure">
                <label class="slds-checkbox" for="mark-complete">
                  <input name="checkbox" type="checkbox" id="mark-complete" />
                  <span class="slds-checkbox--faux"></span>
                  <span class="slds-form-element__label slds-assistive-text">mark-complete</span>
                </label>
              </div>
              <div class="slds-media__body">
                <p class="slds-tile__title slds-truncate"><a href="#">Review proposals for EBC deck with larger team and have marketing review this</a></p>
                <ul class="slds-tile__detail slds-list--horizontal slds-text-body--small">
                  <li class="slds-list__item slds-m-right--large">
                    <span>Contact:</span>
                    <span class="slds-m-left--xx-small"><a href="#">Lei Chan</a></span>
                  </li>
                  <li class="slds-list__item">
                    <span>Assigned to:</span>
                    <span class="slds-m-left--xx-small"><a href="#">Betty Mason</a></span>
                  </li>
                </ul>
              </div>
            </div>
          </div>
        </div>
      </div>
      <div class="slds-media__figure slds-media__figure--reverse">
        <div class="slds-timeline__actions">
          <p class="slds-timeline__date">Feb 24</p>
          <button class="slds-button slds-button--icon-border-filled">
            <svg aria-hidden="true" class="slds-button__icon">
              <use xlink:href="/assets/icons/utility-sprite/svg/symbols.svg#switch"></use>
            </svg>
            <span class="slds-assistive-text">Switch</span>
          </button>
        </div>
      </div>
    </div>
  </li>
  <li class="slds-timeline__item">
    <span class="slds-assistive-text">Event</span>
    <div class="slds-media">
      <div class="slds-media__body">
        <div class="slds-media slds-media--timeline slds-timeline__media--event">
          <div class="slds-media__figure">
            <svg aria-hidden="true" class="slds-icon slds-icon-standard-event slds-timeline__icon">
              <use xlink:href="/assets/icons/standard-sprite/svg/symbols.svg#event"></use>
            </svg>
          </div>
          <div class="slds-media__body">
            <p><a href="#">Company One — EBC Meeting</a></p>
            <p class="slds-truncate">Let&#x27;s get together to review the theater&#x27;s layout and facilities. We&#x27;ll also discuss potential things that truncate at a certain width.</p>
            <ul class="slds-list--horizontal slds-text-body--small">
              <li class="slds-list__item slds-m-right--large">
                <span>Time:</span>
                <span class="slds-m-left--xx-small"><a href="#">Feb 23, 2015 11:00am–12:00pm</a></span>
              </li>
              <li class="slds-list__item">
                <span>Location:</span>
                <span class="slds-m-left--xx-small"><a href="#">300 Pike St, San Francisco CA</a></span>
              </li>
            </ul>
            <span class="slds-text-body--small">
              <span>Name:</span>
              <span class="slds-m-left--xx-small"><a href="#">Lei Chan</a>, <a href="#">Jason Dewar</a>, <a href="#">Gwen Jones</a> and <a href="#">Pete Schaffer</a></span>
            </span>
          </div>
        </div>
      </div>
      <div class="slds-media__figure slds-media__figure--reverse">
        <div class="slds-timeline__actions">
          <p class="slds-timeline__date">Feb 24</p>
          <button class="slds-button slds-button--icon-border-filled">
            <svg aria-hidden="true" class="slds-button__icon">
              <use xlink:href="/assets/icons/utility-sprite/svg/symbols.svg#switch"></use>
            </svg>
            <span class="slds-assistive-text">Switch</span>
          </button>
        </div>
      </div>
    </div>
  </li>
  <li class="slds-timeline__item">
    <span class="slds-assistive-text">Call</span>
    <div class="slds-media">
      <div class="slds-media__body">
        <div class="slds-media slds-media--timeline slds-timeline__media--call">
          <div class="slds-media__figure">
            <svg aria-hidden="true" class="slds-icon slds-icon-standard-log-a-call slds-timeline__icon">
              <use xlink:href="/assets/icons/standard-sprite/svg/symbols.svg#log_a_call"></use>
            </svg>
          </div>
          <div class="slds-media__body">
            <p><a href="#">Mobile conversation on Monday</a></p>
            <p class="slds-truncate">Lei seemed interested in closing this deal quickly! Let&#x27;s move move.</p>
            <ul class="slds-list--horizontal slds-text-body--small">
              <li class="slds-list__item slds-m-right--large">
                <span>Name:</span>
                <span class="slds-m-left--xx-small"><a href="#">Lei Chan</a></span>
              </li>
              <li class="slds-list__item">
                <span>Assigned to:</span>
                <span class="slds-m-left--xx-small"><a href="#">Betty Mason</a></span>
              </li>
            </ul>
          </div>
        </div>
      </div>
      <div class="slds-media__figure slds-media__figure--reverse">
        <div class="slds-timeline__actions">
          <p class="slds-timeline__date">Feb 24</p>
          <button class="slds-button slds-button--icon-border-filled">
            <svg aria-hidden="true" class="slds-button__icon">
              <use xlink:href="/assets/icons/utility-sprite/svg/symbols.svg#switch"></use>
            </svg>
            <span class="slds-assistive-text">Switch</span>
          </button>
        </div>
      </div>
    </div>
  </li>
  <li class="slds-timeline__item">
    <span class="slds-assistive-text">Email</span>
    <div class="slds-media">
      <div class="slds-media__body">
        <div class="slds-media slds-media--timeline slds-timeline__media--email">
          <div class="slds-media__figure">
            <svg aria-hidden="true" class="slds-icon slds-icon-standard-email slds-timeline__icon">
              <use xlink:href="/assets/icons/standard-sprite/svg/symbols.svg#email"></use>
            </svg>
          </div>
          <div class="slds-media__body">
            <div class="slds-tile">
              <p class="slds-tile__title slds-truncate"><a href="#">Updated Proposals</a></p>
              <div class="slds-tile__detail">
                <p class="slds-truncate">Hi guys, Thanks for meeting with the team today and going through the proposals we saw. This goes on until it&#x27;s truncated.</p>
                <ul class="slds-list--horizontal slds-text-body--small">
                  <li class="slds-list__item slds-m-right--large">
                    <span>To:</span>
                    <span class="slds-m-left--xx-small"><a href="#">Lei Chan</a></span>
                  </li>
                  <li class="slds-list__item">
                    <span>From:</span>
                    <span class="slds-m-left--xx-small"><a href="#">Jason Dewar</a></span>
                  </li>
                </ul>
              </div>
            </div>
          </div>
        </div>
      </div>
      <div class="slds-media__figure slds-media__figure--reverse">
        <div class="slds-timeline__actions">
          <p class="slds-timeline__date">Feb 24</p>
          <button class="slds-button slds-button--icon-border-filled">
            <svg aria-hidden="true" class="slds-button__icon">
              <use xlink:href="/assets/icons/utility-sprite/svg/symbols.svg#switch"></use>
            </svg>
            <span class="slds-assistive-text">Switch</span>
          </button>
        </div>
      </div>
    </div>
  </li>
</ul>

Component Overview

Each Activity timeline item receives its width from the parent list. It can consume the full width of the main page area or be placed in the smaller right sidebar.

Accessibility

Text describing the type of timeline item is placed in a span. It is the first element in the .slds-timeline__item and should be hidden with the .slds-assistive-text class. The SVG image does not need the .slds-assistive-text class.

Usage

This table gives you a quick overview of the SLDS CSS classes that can be applied to create activity timeline.
Class NameUsage
.timeline
Applied to:

ul

Outcome:

Defines the overall timeline component

Required:

Required

Comments:

By default icons have a white fill color

.slds-timeline__item
Applied to:

li

Outcome:

Defines each item on the timeline

Required:

Required

Comments:

--

.slds-media--timeline
Applied to:

.slds-media

Outcome:

Applies the left border and bottom padding

Required:

Required

Comments:

--

.slds-timeline__media--call
Applied to:

.slds-media--timeline

Outcome:

Gives the left border a unique color to match the call icon

Required:

No, optional element or modifier

Comments:

--

.slds-timeline__media--email
Applied to:

.slds-media--timeline

Outcome:

Gives the left border a unique color to match the email icon

Required:

No, optional element or modifier

Comments:

--

.slds-timeline__media--event
Applied to:

.slds-media--timeline

Outcome:

Gives the left border a unique color to match the event icon

Required:

No, optional element or modifier

Comments:

--

.slds-timeline__media--task
Applied to:

.slds-media--timeline

Outcome:

Gives the left border a unique color to match the task icon

Required:

No, optional element or modifier

Comments:

--

.slds-timeline__actions
Applied to:

div

Outcome:

Container for date and button icon on the right of a timeline item

Required:

Required

Comments:

This is directly inside the .slds-media--reverse > .slds-media__figure

.slds-timeline__date
Applied to:

p

Outcome:

Styles the date inside .slds-timeline__actions

Required:

Required

Comments:

--

.slds-timeline__icon
Applied to:

svg

Outcome:

Adds the 2px white border around the icon

Required:

Required

Comments:

This is added to the icon inside the .slds-media__figure in .slds-media--timeline